/**
 * 
 */
package org.lansir.af.ui.phone;

import org.lansir.af.R;
import org.lansir.af.gtalk.GtalkApplication;
import org.lansir.af.ui.BaseSinglePaneActivity;
import org.lansir.af.ui.ContactListActivity;
import org.lansir.af.ui.LoginFragment;
import org.lansir.af.view.WidgetQuickActionDialog;
import org.lansir.af.view.WidgetQuickActionDialogItem;

import android.app.Application;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.PopupWindow;
import android.widget.TextView;

/**
 * @author lanzhihong
 *
 */
public class LoginActivity extends BaseSinglePaneActivity {

	private GtalkApplication mGtalkApplication;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		Application app = getApplication();
		if (app instanceof GtalkApplication) {
			mGtalkApplication = (GtalkApplication) app;
			if (mGtalkApplication.isConnected()) {
				startActivity(new Intent(this, ContactListActivity.class));
				finish();
			}
		}
		
		super.onCreate(savedInstanceState);
	}

	@Override
	protected Fragment onCreatePane() {
		
		return new LoginFragment();
	}

	
}
